package net.telesing.tcmc.common;

import java.util.List;

/**
 * Created by 白义顺 on 2014/12/10.
 */
public class QueryReturn<T>
{
    private int total;
    private List<T> rows;
    private int pageSum;
    private int pageRows;//页面显示条数

    public QueryReturn(int total, List<T> rows,int pageRows)
    {
        this.total = total;
        this.rows = rows;
        this.pageRows = pageRows;
        this.pageSum =  (int) Math.ceil((double)total/pageRows);
    }

    public int getTotal()
    {
        return total;
    }

    public void setTotal(int total)
    {
        this.total = total;
    }

    public List<T> getRows()
    {
        return rows;
    }

    public void setRows(List<T> rows)
    {
        this.rows = rows;
    }

    public int getPageSum()
    {
        return pageSum;
    }

    public void setPageSum(int pageSum)
    {
        this.pageSum = pageSum;
    }

    public int getPageRows()
    {
        return pageRows;
    }

    public void setPageRows(int pageRows)
    {
        this.pageRows = pageRows;
    }
}
